package cn.gcBlock.rest;

import cn.gcBlock.dto.BlockCurrencyQueryCriteria;
import cn.gcBlock.po.BlockCurrency;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author jie
 * @date 2019-08-22
 */
@Api(tags = "WEB端发币签名管理")
@FeignClient(name = "RestBlockCurrencyService",
        url = "${rpc.block.url}"
)
public interface RestBlockCurrencyService {

    @ApiOperation(value = "查询币种信息列表")
    @GetMapping(value = "/blockCurrency")
    ResponseEntity getBlockCurrency(@ModelAttribute BlockCurrencyQueryCriteria criteria,@ModelAttribute  Pageable pageable);

    @ApiOperation(value = "发币")
    @PostMapping(value = "/blockCurrency")
    ResponseEntity create(@Validated @RequestBody BlockCurrency resources);

    @ApiOperation(value = "删除管理器中的币种信息")
    @DeleteMapping(value = "/blockCurrency/{id}")
    ResponseEntity delete(@PathVariable int id);
}